package main.java.command;

/**
 * 命令模式
 */
public class Demo {
    public static void main(String[] args) {
        Order order = new Order();
        order.setDiningTable(1);
        order.setFood("蛋炒饭",1);
        order.setFood("可乐小",2);

        Order order1 = new Order();
        order1.setDiningTable(2);
        order1.setFood("火腿炒饭",1);
        order1.setFood("雪碧小",1);

        SeniorChef receiver = new SeniorChef();
        OrderCommand orderCommand1 = new OrderCommand(receiver,order);
        OrderCommand orderCommand2 = new OrderCommand(receiver,order1);

        Waitor waitor = new Waitor();
        waitor.setCommand(orderCommand1);
        waitor.setCommand(orderCommand2);


        waitor.orderUp();
    }
}
